<?php
header("content-type:text/html;charset=utf-8");
include "../public/config/config.php";
include "../public/include/funcs.php";

$id = $_GET['id'];
$link=conn($cfg_dbhost,$cfg_dbuser,$cfg_dbpwd,$cfg_dbname,$cfg_dbchar);

$arr = select($link, "user", "id=$id");
$name = $arr[0]['tname'] ? $arr[0]['tname'] : $arr[0]['nickname'];
echo json_encode($name);
//echo "abc";
?>